<{include file="simple_header.tpl"}>
<link href="/css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/swfupload/swfupload.js"></script>
<script type="text/javascript" src="/js/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="/js/fileprogress.js"></script>
<script type="text/javascript" src="/js/handlers.js"></script>
<script type="text/javascript">
		var swfu;

		window.onload = function() {
			var settings = {
				flash_url : "/js/swfupload/swfupload.swf",
				flash9_url : "/js/swfupload/swfupload_fp9.swf",
				upload_url: "/book/batchupload",
				post_params: {"user_id" : "<{$user_id}>","user_name":"<{$user_name}>"},
				file_size_limit : "100 MB",
				file_types : "*.txt",
				file_types_description : "All Files",
				file_upload_limit : 100,
				file_queue_limit : 0,
				custom_settings : {
					progressTarget : "fsUploadProgress",
					cancelButtonId : "btnCancel"
				},
				debug: false,

				// Button settings
				button_image_url: "/images/TestImageNoText_65x29.png",
				button_width: "85",
				button_height: "29",
				button_placeholder_id: "spanButtonPlaceHolder",
				button_text: '<span class="theFont">批量上传</span>',
				button_text_style: ".theFont { font-size: 14; }",
				button_text_left_padding: 2,
				button_text_top_padding: 3,
				
				// The event handler functions are defined in handlers.js
				swfupload_preload_handler : preLoad,
				swfupload_load_failed_handler : loadFailed,
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccess,
				upload_complete_handler : uploadComplete,
				queue_complete_handler : queueComplete	// Queue plugin event
			};

			swfu = new SWFUpload(settings);
	     };
	</script>
</head>
<body>

<h1>批量上传图书</h1>

<div id="content">
	<form id="form1" action="/book/batchUpload" method="post" enctype="multipart/form-data">
        <input type='hidden' name='up' value='1' />
			<div class="fieldset flash" id="fsUploadProgress">
			<span class="legend">上传队列</span>
			</div>
		<div id="divStatus">0 Files Uploaded</div>
			<div>
				<span id="spanButtonPlaceHolder"></span>
				<input id="btnCancel" type="button" value="取消所有上传"
                onclick="swfu.cancelQueue();" disabled="disabled"
                style="margin-left: 2px; font-size: 10pt; height: 29px;" />
			</div>
	</form>
</div>
<{include file="footer.tpl"}>
